package hello;

public class Case9 {
    public static void main(String[] args) {
        Integer a = new Integer(452);
        int b = a.intValue();
        System.out.println(b);
        Character char1 = new Character('a');
        Character char2 = new Character('A');
        System.out.println(char1.equals(char2));
        char1 = Character.toLowerCase(char1);
        char2 = Character.toLowerCase(char2);
        System.out.println(char1.equals(char2));
        String s = "true";
        boolean bool = Boolean.valueOf(s);
        System.out.println("boolean" + bool);
        //能够验证String的内容是否为数字，不是则抛出异常NumberFormatException
        try {
            String str = "123A123";
            int i = Integer.parseInt(str);
            System.out.println(i);
        }catch (NumberFormatException e){
            System.out.println("str的内容不是数字");
        }

    }
}
